package com.uama.plugin.reference;

import com.intellij.openapi.util.TextRange;
import com.intellij.psi.*;
import com.intellij.psi.search.GlobalSearchScope;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class MyRef extends PsiReferenceBase<PsiElement> {


    public MyRef(@NotNull PsiElement element, TextRange rangeInElement) {
        super(element, rangeInElement);
    }

    public MyRef(@NotNull PsiElement element) {
        super(element);
    }

    @Nullable
    @Override
    public PsiElement resolve() {
        String str = "com.xsz.springboot.util.Hello";
        PsiElement element = getElement();
        JavaPsiFacade javaPsiFacade = JavaPsiFacade.getInstance(element.getProject());
        PsiClass aClass = javaPsiFacade.findClass(str, GlobalSearchScope.allScope(element.getProject()));
        return aClass;
    }

    @NotNull
    @Override
    public Object[] getVariants() {
        return new Object[0];
    }
}
